<include file="Public:header" />
<div id="test"></div>
<script type="text/javascript" src="/Public/Js/jquery1.10.2.min.js"></script>
<script type="text/javascript">
$(function() {
    var userJons = {$userJons};
    var a = {type: 'pie', name: '招生顾问比率图', data: [{name: '成交', y: 2.53, sliced: true, selected: true }] };
    /*$.each(a.data[5], function(i, n){
      alert( "Item #" + i + ": " + n );
    });*/

    a.data[0] = [userJons[82]['username'], parseFloat(userJons[82]['value'])];
    a.data[1] = [userJons[83]['username'], parseFloat(userJons[83]['value'])];
    a.data[2] = [userJons[84]['username'], parseFloat(userJons[84]['value'])];
    a.data[3] = [userJons[85]['username'], parseFloat(userJons[85]['value'])];
    a.data[4] = [userJons[86]['username'], parseFloat(userJons[86]['value'])];
    a.data[5] = [userJons[87]['username'], parseFloat(userJons[87]['value'])];
    a.data[6] = [userJons[88]['username'], parseFloat(userJons[88]['value'])];

    $('#container').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '招生顾问'
        },
        tooltip: {
            pointFormat: '{series.name}: <b><b>{point.y}个</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[a]
    });

    var signJons = {$signJons};
    var b = {type: 'pie', name: '签约类型比率图', data: [{name: '男', y: 2.53, sliced: true, selected: true }] };
    //b.data[0]['y'] = parseFloat(signJons[0]['value']);
    b.data[0] = [signJons[0]['name'], parseFloat(signJons[0]['value'])];
    b.data[1] = [signJons[1]['name'], parseFloat(signJons[1]['value'])];
    b.data[2] = [signJons[2]['name'], parseFloat(signJons[2]['value'])];
    b.data[3] = [signJons[3]['name'], parseFloat(signJons[3]['value'])];
    b.data[4] = [signJons[4]['name'], parseFloat(signJons[4]['value'])];

    //alert(b.data);
    $('#container2').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '签约类型'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.y}人</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[b]
    });

    var hetongJons = {$hetongJons};
    var c = {type: 'pie', name: '合同类型比率图', data: [{name: '转化率', y: 2.53, sliced: true, selected: true }] };
    c.data[0] = [hetongJons[0]['name'], parseFloat(hetongJons[0]['value'])];
    c.data[1] = [hetongJons[1]['name'], parseFloat(hetongJons[1]['value'])];
    c.data[2] = [hetongJons[2]['name'], parseFloat(hetongJons[2]['value'])];
    c.data[3] = [hetongJons[3]['name'], parseFloat(hetongJons[3]['value'])];
    c.data[4] = [hetongJons[4]['name'], parseFloat(hetongJons[4]['value'])];

    $('#container3').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '合同类型'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.2f} %</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[c]
    });



    var laiyuanJons = {$laiyuanJons};
    var c = {type: 'pie', name: '学生来源比率图', data: [{name: '转化率', y: 2.53, sliced: true, selected: true }] };
    c.data[0] = [laiyuanJons[0]['name'], parseFloat(laiyuanJons[0]['value'])];
    c.data[1] = [laiyuanJons[1]['name'], parseFloat(laiyuanJons[1]['value'])];
    c.data[2] = [laiyuanJons[2]['name'], parseFloat(laiyuanJons[2]['value'])];
    c.data[3] = [laiyuanJons[3]['name'], parseFloat(laiyuanJons[3]['value'])];
    c.data[4] = [laiyuanJons[4]['name'], parseFloat(laiyuanJons[4]['value'])];
    c.data[5] = [laiyuanJons[5]['name'], parseFloat(laiyuanJons[5]['value'])];
    c.data[6] = [laiyuanJons[6]['name'], parseFloat(laiyuanJons[6]['value'])];
    c.data[7] = [laiyuanJons[7]['name'], parseFloat(laiyuanJons[7]['value'])];

    $('#container4').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '学生来源'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.2f} %</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[c]
    });


    var applyJons = {$applyJons};
    var c = {type: 'pie', name: '签约时间比率图', data: [{name: '转化率', y: 2.53, sliced: true, selected: true }] };
    c.data[0] = [applyJons[0]['name'], parseFloat(applyJons[0]['value'])];
    c.data[1] = [applyJons[1]['name'], parseFloat(applyJons[1]['value'])];
    c.data[2] = [applyJons[2]['name'], parseFloat(applyJons[2]['value'])];
    c.data[3] = [applyJons[3]['name'], parseFloat(applyJons[3]['value'])];
    c.data[4] = [applyJons[4]['name'], parseFloat(applyJons[4]['value'])];
    c.data[5] = [applyJons[5]['name'], parseFloat(applyJons[5]['value'])];
    c.data[6] = [applyJons[6]['name'], parseFloat(applyJons[6]['value'])];

    $('#container5').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '签约时间'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.2f} %</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[c]
    });


    var xueliJons = {$xueliJons};
    var c = {type: 'pie', name: '学历比率图', data: [{name: '转化率', y: 2.53, sliced: true, selected: true }] };
    c.data[0] = [xueliJons[0]['name'], parseFloat(xueliJons[0]['value'])];
    c.data[1] = [xueliJons[1]['name'], parseFloat(xueliJons[1]['value'])];
    c.data[2] = [xueliJons[2]['name'], parseFloat(xueliJons[2]['value'])];
    c.data[3] = [xueliJons[3]['name'], parseFloat(xueliJons[3]['value'])];
    c.data[4] = [xueliJons[4]['name'], parseFloat(xueliJons[4]['value'])];

    $('#container6').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: '学历'
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.2f} %</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.2f} %'
                }
            }
        },
        series:[c]
    });

});
function getType(o) {
var _t; return ((_t = typeof(o)) == "object" ? o==null && "null" || Object.prototype.toString.call(o).slice(8,-1):_t).toLowerCase();
}

</script>
<script src="/Public/Highcharts/js/highcharts.js"></script>
<script src="/Public/Highcharts/js/modules/exporting.js"></script>
<style type="text/css">
  #searchTime { display: none; }
</style>
<div class="subnav">
  <div class="explain-col" style="position: relative;">
    <form name="searchForm" id="searchForm" method="GET" action="">
      统计分析：
      <select name="searchType" id="searchType" >
            <option value="0" selected="selected">全部</option>
            <option value="4" <eq name="Think.get.searchType" value="4"> selected="selected"</eq> />今天</option>
            <option value="3" <eq name="Think.get.searchType" value="3"> selected="selected"</eq> />昨天</option>
            <option value="6" <eq name="Think.get.searchType" value="6"> selected="selected"</eq> />本月</option>
            <option value="1" <eq name="Think.get.searchType" value="1"> selected="selected"</eq> />上月</option>
            <option value="2" <eq name="Think.get.searchType" value="2"> selected="selected"</eq> />本周</option>
            <option value="10" <eq name="Think.get.searchType" value="10"> selected="selected"</eq> />自定</option>
      </select>
      <select name="sign_status" id="sign_status" >
            <option value="" selected="selected">请选择签约状态</option>
            <option value="0" <eq name="Think.get.sign_status" value="0"> selected="selected"</eq> />正在洽谈</option>
            <option value="1" <eq name="Think.get.sign_status" value="1"> selected="selected"</eq> />已经签约</option>
      </select>



      <span id="searchTime" >
      从：<input type="text" class="input-text Wdate" size="30" name="sDate" id="sDate" value="{$sDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" />
      到&nbsp;
      <input type="text" class="input-text Wdate" size="30" name="eDate" id="eDate" value="{$eDate}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="readonly" style="width:140px;" />
      </span>
      <eq name="showUserStatistics" value="1">
      <!-- <select name="userId" id="userId" onchange="searchForm.submit();" >
            <option value="0" selected="selected">请选择用户</option>
            <volist name="userList" id="vo">
            <option value="{$vo.id}" <eq name="Think.get.userId" value="$vo.id"> selected="selected"</eq> />{$vo.username}</option>
            </volist>
      </select> -->
      </eq>
      <input type="submit" value=" 搜索 " class="button" />
    </form>
      <div class="content-menu" style="position: absolute; right: 30px;top: 5px;">

      </div>
  </div>
</div>
<!--subnav-->

<!-- <div class="pad-lr-10" >
  <form name="myform" id="myform" action="__URL__/deleteAll" method="GET">
    <div class="table-list">
        <table width="100%" cellspacing="0">
          <thead>
            <tr>
              <th align="center" width="120" >客户总量</th>
              <th align="center" >已经签约</th>
              <th align="center" >正在洽谈</th>

            </tr>
          </thead>
          <tbody  id="list">
            <tr class="callList">
               <td align="center" >{$total}</td>
               <td align="center" class="red">{$sign_status[1]}</td>
               <td align="center" class="red">{$sign_status[0]}</td>

            </tr>
          </tbody>
        </table>
     </div>
    <div class="btn">
    <span style="margin-right:10px; color:#000">说明：</span> 新客户为当前时间段新添加的电话客户，单位为（人）；<span class="red">流失率</span>为：未成交的新电话客户与总客户量的百分比
    </div>
  </form>
</div> -->

<div id="container" style="min-width: 410px; height: 400px; float:left"><!-- 统计图区域 --></div>
<div id="container2" style="min-width: 410px; height: 400px; float:left; margin-left:130px;"><!-- 统计图区域 --></div>
<div id="container3" style="min-width: 410px; height: 400px; float:left; margin-left:130px;"><!-- 统计图区域 --></div>

<div id="container4" style="min-width: 410px; height: 400px; float:left; margin-left:10px;"><!-- 统计图区域 --></div>
<div id="container5" style="min-width: 410px; height: 400px; float:left; margin-left:130px;"><!-- 统计图区域 --></div>
<div id="container6" style="min-width: 410px; height: 400px; float:left; margin-left:130px;"><!-- 统计图区域 --></div>

</body>
</html>
<script type="text/javascript" src="__PUBLIC__/Js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
$(function(){
  changeType();

  $("#searchType").change(function(){
    changeType();
  })
})

function changeType(){
  var searchType = $("#searchType").val();
  if(searchType==10){
      $("#searchTime").show();
  }else{
    $("#searchTime").hide();
  }
}
</script>